1. Field of the Invention
The present invention relates to an information processing apparatus and control method therefore, particularly to an image recognition technique.
2. Description of the Related Art
Conventionally, an object recognition (image recognition) technique is known, which causes an image sensing device to sense an object to acquire image data and calculates the position and orientation of the object by analyzing the image data.
Japanese Patent Laid-Open No. 09-282454 discloses the following object recognition technique. First, low-resolution object recognition processing is executed to coarsely obtain the position and orientation of a whole recognition target object (recognition processing of first phase). A local recognition range is set around a characteristic part on the object on the basis of the recognition result. High-resolution object recognition processing is partially executed for only the local recognition range (recognition processing of second phase). The characteristic part on the object includes, e.g., a hole for a screw or rod, a projection for assembly, and a mark on the object surface. The position and orientation of the entire target object are calculated on the basis of the object recognition result in the local recognition range.
However, the arrangement disclosed in Japanese Patent Laid-Open No. 09-282454 requires a predetermined time between the recognition processing of the first phase and the recognition processing of the second phase. For this reason, it is difficult to accurately recognize an object in an environment where the image sensing conditions dynamically change due to, e.g., variations in illumination conditions, variations in size and shape of the recognition target object, and rotation of the recognition target object.
Hence, if the recognition target object is a human face, and the facial expression at a given point of time should be recognized, the conventional technique mentioned above cannot be used.
On the other hand, there is another conventional technique which analyzes the image data of a sensed face image and recognizes the eye region of the recognition target in the sensed image on the basis of the analysis result.
Japanese Patent No. 3452685 discloses a face image processing technique. In this technique, only a low luminance value is extracted from a face image by using a filter to extract a low luminance value and binarized. The barycenter of the binary image is calculated. The barycentric position is set as the barycentric position of the face. An eye existence region is set on the basis of the barycentric position. At least one eye existence candidate region is set in the existence region. The candidate regions allow to determine the eye region.
The face image processing technique disclosed in Japanese Patent No. 3452685 is implemented to process an image which contains only a face. Hence, if a background is present in the image, the face barycentric position may be recognized as a position far from the true position. In this case, the eye region cannot be set correctly. When setting a region by the technique disclosed in Japanese Patent No. 3452685, the distance between the camera and the object is measured in advance, and the eye region is set on the basis of the measured distance, independent of the size of the face of the object. For this reason, correct region setting may be impossible for an arbitrary face size. Correct region setting may also be impossible when a variation such as rotation occurs.